package com.mnsq.common.tools.valid;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by Zj on 2018/7/8 0008.
 */
public class SecurityHeaderValid {
    public static String getTokenOfHeader(String vl){
        if(StringUtils.isNotBlank(vl)){
            String[] authToken = vl.split("-");
            if(authToken.length == 2){
                if("Basic".equals(authToken[0])){
                    return authToken[1];
                }
            }
        }
        return null;
    }
}
